package com.smart.common.entities.option;

import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author Xiaxuqiu
 * 用于前端select选项的数据字典结构封装
 * @date 2021-11-24
 **/
@Data
@Accessors(chain = true)
@NoArgsConstructor
public class SelectOption implements Serializable {


    @NotBlank(message = "选项文本不能为空")
    @Length(max = 30, message = "选项文本长度不能超过30个字符")
    String label;

    @NotBlank(message = "选项值不能为空")
    String value;

    /**
     * 主题皮肤
     */
    String theme;

    @NotNull(message = "可用状态不能为空")
    boolean disabled;


    int sort;


}
